package com.xxp.mapper;

import com.xxp.controller.request.BaseRequest;
import com.xxp.controller.request.BookRequest;
import com.xxp.entity.Book;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface BookMapper {
    /**
     * 分页查询
     */
    List<Book> listByCondition(BaseRequest baseRequest);

    /**
     * 新增
     * @param book
     */
    void save(Book book);

    /**
     * 根据ID删除
     * @param id
     */
    void delete(Integer id);

    /**
     * 修改
     * @param book
     */
    void update(Book book);

    /**
     * 根据ID查询
     */
    Book getById(Integer id);
}
